#include <stdio.h>
#include <tchar.h>
#include <conio.h>
#include <fwMemDbg.h>
#include "MyGame.h"
#include "Global.h"

#define _MEM_LEAK_DETECT

void ShowSystemConfigState()
{
#ifdef _DEBUG_LOG
	LOGI("-->Debug log is enable\n");
#else
	LOGI("-->Debug log is disable\n");
#endif

#ifdef _MEM_LEAK_DETECT
	LOGI("-->Memory leak detected is enable\n");
	//Check memory leak
	_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
#else
	LOGI("-->Memory leak detected is disable\n");
#endif
}

int _tmain()
{
	ShowSystemConfigState();
	
	MyGame * game = new MyGame;
	if (game->Init(FW_WIN32_GLES_20, Global::Width, Global::Height, "Game Windows With OpenGLESv2", 0) != 0)
		return -1;
	game->Start();
	game->End();
	SAFE_DEL(game);
	_getch();
	return 0;
}